<%@page import="com.blockchain.console.servlets.LoginVerify"%>
<%@page import="com.blockchain.console.servlets.common.Index"%>
<%@page import="com.blockchain.console.servlets.Login"%>
<%@page import="com.blockchain.framework.config.service.VariableManage"%>
<%
	if (blockchainSession != null && blockchainSession.isAuthenticated()) {
		controller.sendRedirect(request, response, controller.getURI(request, Index.class));
		return;
	}

	String errorMsg = controller.getPrompt(request,response,PromptLevel.ERROR);
	VariableManage manager = serviceSession.getService(VariableManage.class);
	String value = manager.getProperty("SYSTEM.AMDIN.KEY");
	 if (StringHelper.isEmpty(errorMsg) && (request.getParameter("key") == null || !request.getParameter("key").equals(value))) {
		controller.sendRedirect(request, response, "null");
		return;
	}
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<link rel="stylesheet"
	href="<%=controller.getStaticPath(request)%>/backv2/css/new_common.css?v=0919">
<%@include file="/WEB-INF/include/meta.jsp"%>
<style>
	.login_hf dl {
		padding-bottom:0px;
	}
</style>
</head>
<body>
	<div class="login_bg"><img src="<%=controller.getStaticPath(request)%>/backv2/images/new_images/login_bg03.jpg"></div>
    <div class="login_center">
        <div class="login_box" style="margin-top:220px;">
        	<img src="<%=controller.getStaticPath(request)%>/backv2/images/new_images/diq.png" alt="" class="new918IMG" />
            <form action="<%=controller.getURI(request, Login.class) %>" method="post" onsubmit="return onSubmit()">
            <input type="hidden" name="_z" value="<%StringHelper.filterHTML(out, request.getParameter("_z"));%>" />
            <div class="login_hf">
            	<div class="new918Titled">BTB 后台管理</div>
                <dl>
                	<dt>用户名：</dt>
                    <dd><div class="username"><input name="username" value="<%StringHelper.filterHTML(out, request.getParameter("username")); %>" type="text" class="input" onblur="accountCheck();"/></div></dd>
                </dl>
                <dl>
                	<dt>密码：</dt>
                    <dd><div class="password"><input name="password" type="password" class="input" onblur="passwordCheck();"/></div></dd>
                </dl>
                <dl>
                	<dt>验证码：</dt>
                    <dd><div class="shortinput"><input name="verifyCode" maxlength="6" type="text" onblur="verifyCheck();"/></div><img src="<%=controller.getURI(request, LoginVerify.class) %>" alt="验证码" title="点击刷新" onclick='this.src="<%=controller.getURI(request, LoginVerify.class) %>?"+Math.random()' style="cursor: pointer;" width="95" height="33"/></dd>
                </dl>
                <p class="login_tips red" id="error" style="color:red;padding-bottom:0px;">
				<%StringHelper.filterHTML(out, errorMsg);%>
				</p>
                <dl style="margin-top:5px;">
                	<dt></dt>
                    <dd><div class="login_btn"><input type="submit" value="登&nbsp;录"></div></dd>
                </dl>
            </div>
			</form>
			</div>
			</div>
	<script type="text/javascript" src="<%=controller.getStaticPath(request)%>/backv2/js/jquery/jquery-1.8.3.min.js"></script>
	<script type="text/javascript" src="<%=controller.getStaticPath(request)%>/js/login.js"></script>
	<script type="text/javascript" src="<%=controller.getStaticPath(request)%>/backv2/js/zankai.js"></script>
</body>
</html>
